<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.w3.org/1999/xhtml">
<head>
    <meta charset="UTF-8">
    <title>register</title>
</head>
<center><h1>用户注册</h1></center>
<form method="get" th:align="center" th:action="@{/register}" th:object="${user}">
    <!--遍历课程列表-->
    <center>
        <label for="username">用户名: </label>
        <input type="text" name="username" id="username" />
        <span class="validationError" th:if="${#fields.hasErrors('username')}"
              th:errors="*{username}">username</span><br/></center>
    <center>
        <label for="password">密码: </label>
        <input type="password" name="password" id="password" />
        <span class="validationError" th:if="${#fields.hasErrors('password')}"
              th:errors="*{password}">password</span><br/></center>

    <center><button class="">提交</button></center>
</form>
<center> <a th:href="@{/login}" id="login">已有账号，我要登录</a></center>
</body>
</html>